package com.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.UUID;

/**
 * @program: springcloud
 * @description:
 * @author: zfy
 * @create: 2020-08-18 08:56
 */
@RestController
public class PaymentController {
    @Value("${server.port}")
    private String serverPort;
    @Resource
//    获取注册信息
    private DiscoveryClient discoveryClient;
    @GetMapping("payment/zk")
    public Object Getdiscovery(){
//
        return "SpringCloud with zookeeper:"+serverPort+UUID.randomUUID().toString();
    }
}